package system

import (
	"github.com/gin-gonic/gin"
	"net/http"
	"project-im/config"
)

func Config(c *gin.Context) {
	// 定义响应数据结构
	//webrtcConfig := struct {
	//	MaxChannel int `json:"maxChannel"`
	//	IceServers []struct {
	//		Urls       string `json:"urls"`
	//		Username   string `json:"username"`
	//		Credential string `json:"credential"`
	//	} `json:"iceServers"`
	//}{
	//	MaxChannel: 9,
	//	IceServers: []struct {
	//		Urls       string `json:"urls"`
	//		Username   string `json:"username"`
	//		Credential string `json:"credential"`
	//	}{
	//		{
	//			Urls:       "stun:www.boxim.online:3478",
	//			Username:   "admin",
	//			Credential: "admin123",
	//		},
	//		{
	//			Urls:       "turn:www.boxim.online:3478",
	//			Username:   "admin",
	//			Credential: "admin123",
	//		},
	//	},
	//}
	c.JSON(http.StatusOK, gin.H{
		"code":    200,
		"message": "成功",
		"data": map[string]interface{}{
			"webrtc": config.AppConfig.Webrtc,
		},
	})
}
